home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / misc / sys / file.h < prev    next >
C/C++ Source or Header  |  1992-11-12  |  2KB  |  56 lines

  1. /* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef    _SYS_FILE_H
  20.  
  21. #define    _SYS_FILE_H    1
  22. #include <features.h>
  23.  
  24. #ifndef    _FCNTL_H
  25. #include <fcntl.h>
  26. #endif
  27.  
  28. __BEGIN_DECLS
  29.  
  30.  
  31. /* Alternate names for values for the WHENCE argument to `lseek'.
  32.    These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively.  */
  33. #define    L_SET    0    /* Seek from beginning of file.  */
  34. #define    L_INCR    1    /* Seek from current position.  */
  35. #define    L_XTND    2    /* Seek from end of file.  */
  36.  
  37.  
  38. /* Operations for the `flock' call.  */
  39. #define    LOCK_SH    1    /* Shared lock.  */
  40. #define    LOCK_EX    2    /* Exclusive lock.  */
  41. #define    LOCK_UN    8    /* Unlock.  */
  42.  
  43. /* Can be OR'd in to one of the above.  */
  44. #define    LOCK_NB    4    /* Don't block when locking.  */
  45.  
  46.  
  47. /* Apply or remove an advisory lock, according to OPERATION,
  48.    on the file FD refers to.  */
  49. extern int __flock __P ((int __fd, int __operation));
  50. extern int flock __P ((int __fd, int __operation));
  51.  
  52.  
  53. __END_DECLS
  54.  
  55. #endif /* sys/file.h  */
  56.